<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>course list</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="./css/mui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="./css/app.css"/>
		<style>
			.title {
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
			}
		</style>
	</head>

	<body>
		<div class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">--</h1>
		</div>
		
		<div class="mui-content">
			<div class="mui-card">
				<div class="mui-card-header mui-card-media" style="height:40vw;background-image:url(http://localhost:8087/media/Oxford%20Online%20English/unnamed.jpg)"></div>
				<div class="mui-card-content">
					<div class="mui-card-content-inner">
						<p class="mui-card-text" style="color: #333;">这里显示文章摘要，让读者对文章内容有个粗略的概念</p>
					</div>
				</div>
			</div>
			
			<div class="title">
			</div>
			<ul class="mui-table-view">
			</ul>
		</div>

	</body>
	<script src="./js/mui.min.js"></script>
	<script src="./js/common.js"></script>
	<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
	<script>
		mui.init({
			swipeBack:true ,//启用右滑关闭功能
		});
		mui.plusReady(function() {
			var self = plus.webview.currentWebview();
			//或通过webview的id找到
			//var self=plus.webview.getWebviewById('openWindow_recieve_page');
			$.ajax({
				url : server+"/tree/treeBranch?nodeId="+self.nodeId,
				type : "GET",
				success : function(data){
					var brief = data.data.brief;
					var pictureUrl = data.data.picture;
					var style = "height:40vw;background-image:url("+mediaServer+"/media/Oxford%20Online%20English/unnamed.jpg);";
					$(".mui-title").html(data.text);
					$(".mui-card-text").html(brief);
					$(".mui-card-media").attr("style",style);
					
					var list = data.children;
					if(list) {
						for(var i in list) {
							var name = list[i].data.name;
							var url = list[i].data.url;
							var discription = list[i].data.discription;
							if(list[i].data.name)
								$(".mui-table-view").append('<li class="mui-table-view-cell mui-media"><a href="'+mediaServer+url+'"><img class="mui-media-object mui-pull-left" src="./images/muwu.jpg"><div class="mui-media-body">'+name+'<p class="mui-ellipsis">'+discription+'</p></div></a></li>');
						}
					}
				},
			});
		});
	</script>
</html>